{% extends "bootstrap/base.html" %}

{% block title %}Flask_Sqlachemy_RESTfulAPI_Codegen{% endblock %}

{% block styles %}
    {{ super() }}
    <link rel="stylesheet" href="../static/css/global.css">
{% endblock %}

{% block content %}

    <div class="panel panel-primary">

        <div class="panel-heading">
            <h3 class="panel-title">Flask_Sqlachemy_RESTfulAPI_Codegen</h3>
        </div>
        <div class="panel-body">
            <h2> 数据库配置 </h2>
            请选择要生成接口项目代码的目标数据库，生成器将针对此数据库生成一个分层设计的接口项目
        </div>

        <div class="panel-body">
            {% if message %}
                <div class="alert alert-danger alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert"
                            aria-hidden="true">
                        &times;
                    </button>
                    {{ message }}
                </div>
            {% endif %}
        </div>
        <form class="form-horizontal" role="form" method="post">
            <div class="panel-body">


                <!--数据库方言-->
                <div class="form-group">
                    <label for="dialect" class="col-sm-2 control-label">数据库方言</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="dialect" value="mysql">
                    </div>
                </div>

                <!--驱动-->
                <div class="form-group">
                    <label for="driver" class="col-sm-2 control-label">驱动</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="driver" value="pymysql">
                    </div>
                </div>

                <!--主机-->
                <div class="form-group">
                    <label for="host" class="col-sm-2 control-label">主机</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="host">
                    </div>
                </div>

                <!--端口-->
                <div class="form-group">
                    <label for="port" class="col-sm-2 control-label">端口号</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="port">
                    </div>
                </div>

                <!--数据库-->
                <div class="form-group">
                    <label for="database" class="col-sm-2 control-label">数据库</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="database">
                    </div>
                </div>

                <!--登录名-->
                <div class="form-group">
                    <label for="username" class="col-sm-2 control-label">登录名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="username">
                    </div>
                </div>

                <!--密码-->
                <div class="form-group">
                    <label for="password" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="password">
                    </div>
                </div>

            </div>

            <div class="panel-body btn-body">
                <button type="submit" class="btn btn-primary btn-next">下一步</button>
            </div>
        </form>
        <div class="panel-footer">
        </div>

    </div>

{% endblock %}